package com.paas.form.core.element.control.impl.searchItem;

import com.paas.form.core.element.control.FormItem;
import com.paas.form.core.element.field.FieLdsModel;
import com.paas.form.core.element.jsContent.ScriptContent;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;


@Data
public class PfUploadFz implements FormItem {
    private FieLdsModel field;
    private String htmlType;

    public static final String EL_PFUPLOADFZ_HTML ="<pf-UploadFz v-model=\"${formObject}.${field.vModel}\" value=\"${pfUploadValue}\"" +
            "  type=\"${pfUploadValue}\"" +
            "  disabled=\"${pfUploadValue}\"" +
            "  showIcon=\"${pfUploadValue}\"" +
            "  showTip=\"${pfUploadValue}\"" +
            "  detailed=\"${pfUploadValue}\"" +
            "  limit=\"${pfUploadValue}\"" +
            "  accept=\"${pfUploadValue}\"" +
            "  buttonText=\"${pfUploadValue}\"" +
            "  sizeUnit=\"${pfUploadValue}\"" +
            "  fileSize=\"${field.fileSize}\"" +
            "   ></pf-UploadFz>";
    public PfUploadFz(FieLdsModel field, String htmlType){
        this.field = field;
        this.htmlType = htmlType;

    }


    @Override
    public String makeVue() {
        Map<String, Object> params = new HashMap<>();
//        params.putAll(this.field);


        return EL_PFUPLOADFZ_HTML;
    }

    @Override
    public ScriptContent makeJs() {
        return null;
    }
}
